<template>
    <div class="payWrap">
        <div class="houseInfo" v-if="houseInfo.xqDataItem">
            <h3>当前选择房屋</h3>
            <p>您已选择：{{houseInfo.xqDataItem.name}} / {{houseInfo.loudongItem.name}} / {{houseInfo.danyuanItem.name}} / {{houseInfo.fangjianItem.name}}</p>
        </div>
        <div class="jfms" v-if="houseInfo.xqDataItem">
            <h3>输入缴费金额</h3>
            <p>缴费描述：{{houseInfo.xqDataItem.paymentDesc}}</p>
            <div class="jeInput">
                <my-input v-model="money" placeholder="请输入金额" type="number"/>
            </div>
        </div>
        <div class="payTypeSt">
            <h3>选择支付方式</h3>
            <div style="padding-top:20px">
                <pay-type :options="{money,houseInfo}"/>
            </div>
        </div>
    </div>
</template>

<script>
import { reactive,toRefs,onMounted } from 'vue'
import myInput from '@/components/myInput.vue'
import payType from '@/components/payType.vue'
export default {
    components:{
        myInput,
        payType
    },
    setup() {
        const state = reactive({
            houseInfo:{},
            money:''
        })

        onMounted(()=>{
            state.houseInfo = JSON.parse(sessionStorage.getItem('selectinfo'))
        })

        return{
            ...toRefs(state)
        }
    },
}
</script>

<style lang="scss" scoped>
    .payWrap{
        text-align: center;
        padding: 10px 0 0 0;
        .houseInfo{
            display: inline-block;
            padding: 37px 50px;
            background: #549dfe;
            border: 2px solid #fff;
            margin: 0 auto;
            line-height: normal;
            color: #fff;
            border-radius:10px ;
            h3{
                font-size: 35px;
                padding: 0;
                margin: 0;
                font-weight: 600;
                text-align: center;
            }
            p{
                font-size: 24px;
                padding: 10px 0 0 0;
            }
        }
        .jfms{
            line-height: normal;
            color: #fff;
            padding: 60px 0 0 0;
            h3{
                font-size: 35px;
                padding: 0;
                margin: 0;
                font-weight: 600;
                text-align: center;
            }
            p{
                font-size: 24px;
                padding: 10px 0 0 0;
            }
            .jeInput{
                display: inline-block;
                width: 500px;
                padding: 20px 0 0 0;
            }
        }
        .payTypeSt{
            line-height: normal;
            color: #fff;
            padding: 40px 0 0 0;
            h3{
                font-size: 35px;
                padding: 0;
                margin: 0;
                font-weight: 600;
                text-align: center;
            }
        }
    }
</style>